package 
{
	import flash.utils.Dictionary;

	/**
	 *  
	 * 打印出的警告
	 * @author iceman
	 * 
	 */
	public class FatWarn
	{
		public static const NOTIFICATION_PROPERTY_EMPTY:int = 1;
		public static const OBSERVER_NO_HAS_CALLBACKFUN:int = 2;
		
		private static var m_warningList:Dictionary = new Dictionary(false);
		private static var m_bInit:Boolean = false;
		/**
		 * 警告 
		 * @param id 警告ID
		 * @param message 补充内容
		 * 
		 */
		public static function Warning(id:int,message:*=""):void
		{
			if(!m_bInit)
			{
				initWarning();
				m_bInit = true;
			}
			var t_str:String = "id:"+String(id) + m_warningList[id] +":"+String(message);
			ftrace(FatWarn,t_str);
		}
		/**
		 * 添加新的警告信息 
		 * @param _id
		 * @param _str
		 * 
		 */
		public static function addWarning(_id:int,_str:String):void
		{
			m_warningList[_id] =  _str;
		}
		/**
		 * 初始化警告信息 
		 * 
		 */
		private static function initWarning():void
		{
			m_warningList[NOTIFICATION_PROPERTY_EMPTY] = "消息属性ARRAY为空";
			m_warningList[OBSERVER_NO_HAS_CALLBACKFUN] = "发送命令 无监听者 或者监听者被移除！";
		}
	}
}